import connector.HttpConnector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;



public class Start {
    public static void main(String[] args) throws IOException {

        final Logger logger = LoggerFactory.getLogger(Start.class);

        String host = "0.0.0.0";
        int port = 8080;

        //try-with-resourses 无需手动释放资源
        try(HttpConnector connector = new HttpConnector(host,port)){
            for(;;){
                try{
                    Thread.sleep(1000);

                }catch (Exception e){
                    break;
                }
            }
        } catch (Exception e) {
            logger.error(e.getMessage());
            throw new RuntimeException(e);
        }

        logger.info("http server shutdown");

    }
}
